﻿
namespace SPContrib.Extensions
{
    /// <summary>
    /// Extensions for the Object class
    /// </summary>
    public static class ObjectExtensions
    {
        /// <summary>
        /// Indicates if the object is not null (i.e. the opposite of IsNull)
        /// </summary>
        public static bool IsNotNull(this object instance)
        {
            return instance.IsNull() == false;
        }

        /// <summary>
        /// Indicates if the object is null
        /// </summary>
        public static bool IsNull(this object instance)
        {
            return object.Equals(null, instance);
        }
    }
}
